﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using System.Data;
using ESOL.Common.Entity;
using System.IO;

namespace ESOL.Services
{
    [ServiceContract]
    public interface IHrService
    {
        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        string HellowWord();

        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOBool IsImportedAttendance(string fileName);

        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOString ImportAttendance(DataTable attendance, string fileName);

        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTODataTable GetOverviewByCondition(HrAttendanceRecordEntity condition);

        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTODataTable GetHrAttendanceRecordByCondition(HrAttendanceRecordEntity condition);


        #region 出差管理
        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTODataTable GetHrTravleApplicationByCondition(HrTravelApplicationEntity condition);


        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOBool InsertHrTravelApplication(HrTravelApplicationEntity TravelApplicationEnity);


        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOBool UpdateHrTravelApplication(HrTravelApplicationEntity TravelApplicationEnity);


        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOBool DeleteHrTravelApplication(HrTravelApplicationEntity TravelApplicationEnity);

        #endregion


        #region 部门管理
        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTODataTable GetDapartmentByCondition(MstDepartmentEntity condition);

        #endregion

        #region 员工档案管理

        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOBool AddHrEmployee(HrEmployeeEntity employee);


        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOBool UpdateHrEmployee(HrEmployeeEntity employee);


        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOHrEmployeeEntity GetEmployeeByNo(HrEmployeeEntity employee);

        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTODataTable GetEmployeeByCondition(HrEmployeeEntity employee);

        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOString GetEmployeePhotoPath();


        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOString UploadFileNew(byte[] fs, string fileName);


        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOByte DownloadFileNew(string fileName);


        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOHrAgentEntity GetHrAgentByEmployeeNo(string employeeNo);

        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOHrEmployeeEntity SaveHrEmployee(HrEmployeeEntity employee, HrAgentEntity agent, List<HrPersonPositionEntity> listPersonPosition);


        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTODataTable GetEmployeePositionById(string employeeId);

        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOBool DeleteHrEmployee(HrEmployeeEntity employee);

        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOBool InsertHrContractHistory(HrContractHistoryEntity history);

        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOBool UpdateHrContractHistory(HrContractHistoryEntity history);


        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOBool DeleteHrContractHistory(HrContractHistoryEntity history);


        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOBool ApproveHrContractHistory(HrContractHistoryEntity history);


        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTODataTable GetHrContractHistoryByCondition(HrContractHistoryEntity condition, HrEmployeeEntity employeeCondition);


        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTODataTable GetHrSalaryChangeByCondition(HrSalaryChangeEntity condition);

        #endregion


        #region 请假管理
        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTODataTable GetLeaveApplicationsByCondition(HrLeaveApplicationEntity condition);

        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOBool DeleteHrLeaveApplication(HrLeaveApplicationEntity entity);

        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOBool InsertHrLeaveApplication(HrLeaveApplicationEntity entity);


        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOBool UpdateHrLeaveApplication(HrLeaveApplicationEntity entity);


        #endregion

        #region 补考勤卡
        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTODataTable GetCardLossByCondition(DTOHrAttendanceCardLossEntity entity);


        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOBool DeleteHrAttendanceCardLoss(HrAttendanceCardLossEntity entity);


        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOBool InsertHrAttendanceCardLoss(HrAttendanceCardLossEntity entity);


        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOBool UpdateHrAttendanceCardLoss(HrAttendanceCardLossEntity entity);
        #endregion


        #region 用车管理
        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTODataTable GetHrCarRentingByCondition(DTOHrCarRentingEntity entity);


        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOBool DeleteHrCarRenting(HrCarRentingEntity entity);


        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOBool InsertHrCarRenting(HrCarRentingEntity entity);


        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOBool UpdateHrCarRenting(HrCarRentingEntity entity);
        #endregion



        #region 转正客理
        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTODataTable GetHrFormalApplicationByCondition(HrFormalApplicationEntity entity, string rowCount);


        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOBool DeleteHrFormalApplication(HrFormalApplicationEntity entity);


        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOBool InsertHrFormalApplication(HrFormalApplicationEntity entity);


        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOBool UpdateHrFormalApplication(HrFormalApplicationEntity entity);


        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOBool ApproveHrFormalApplication(HrFormalApplicationEntity entity);
        #endregion


        #region 离职管理
        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTODataTable GetHrEmployeeLeaveApplicationByCondition(HrPersonLeaveApplicationEntity entity, string rowCount);


        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOBool DeleteHrEmployeeLeaveApplication(HrPersonLeaveApplicationEntity entity);


        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOBool InsertHrEmployeeLeaveApplication(HrPersonLeaveApplicationEntity entity);


        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOBool UpdateHrEmployeeLeaveApplication(HrPersonLeaveApplicationEntity entity);


        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOBool ApproveHrEmployeeLeaveApplication(HrPersonLeaveApplicationEntity entity);
        #endregion



        #region 调职管理

        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTODataTable GetHrPersonPositionApplicationByCondition(HrPersonPositionApplicationEntity entity, string rowCount);


        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOBool DeleteHrPersonPositionApplication(HrPersonPositionApplicationEntity entity);


        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOBool InsertHrPersonPositionApplication(HrPersonPositionApplicationEntity entity);


        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOBool UpdateHrPersonPositionApplication(HrPersonPositionApplicationEntity entity);


        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOBool ApprovePersonPositionApplication(HrPersonPositionApplicationEntity entity);

        #endregion


        #region 调薪管理

        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOBool DeleteHrSalaryChange(HrSalaryChangeEntity entity);


        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOBool InsertHrSalaryChange(HrSalaryChangeEntity entity);


        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOBool UpdateHrSalaryChange(HrSalaryChangeEntity entity);


        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOBool ApproveHrSalaryChange(HrSalaryChangeEntity entity);

        #endregion


        #region 出门证
        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTODataTable GetHrEmployeeIoRecordByCondition(DTOHrEmployeeIoRecordEntity entity);


        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOBool DeleteHrEmployeeIoRecord(HrEmployeeIoRecordEntity entity);


        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOBool InsertHrEmployeeIoRecord(HrEmployeeIoRecordEntity entity);


        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOBool UpdateHrEmployeeIoRecord(HrEmployeeIoRecordEntity entity);
        #endregion


        #region 工资管理
        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTODataTable GetHrMonthSalaryByCondition(HrMonthSalaryEntity salaryCondition, HrEmployeeEntity employeeCondition, string month);


        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTODataTable GetHrMonthSalaryItemDetail(string salaryId);

        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOBool DeleteHrMonthlySalary(HrMonthSalaryEntity entity);


        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOBool InsertHrMonthSalary(HrMonthSalaryEntity entity, List<HrMonthSalaryItemEntity> salaryItems);


        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOBool UpdateHrMonthSalary(HrMonthSalaryEntity entity, List<HrMonthSalaryItemEntity> salaryItems);


        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOBool SubmitHrMonthSalary(string salaryMonth);


        [OperationContract]
        [FaultContract(typeof(ProcessExecutionFault))]
        DTOBool ApproveHrMonthSalary(HrMonthSalaryEntity entity);
        //[OperationContract]
        //[FaultContract(typeof(ProcessExecutionFault))]
        //DTOBool InsertHrMonthSalaryList(List<HrMonthSalaryEntity> entityList);


        //[OperationContract]
        //[FaultContract(typeof(ProcessExecutionFault))]
        //DTOBool UpdateHrMonthSalaryList(List<HrMonthSalaryEntity> entityList);
        #endregion
    }
}
